import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', () => {

  const activeExmTab = ref(0)
  const changeExmTab = (item: number) => {
    activeExmTab.value = item
  }


  const downLoad = (type: 'web' | 'ps' | 'api') => {
    switch (type) {
      case 'web':
        window.open('https://pan.baidu.com/s/13BwrMrpAqifvHZSSFK58sw?pwd=zkdj', "_blank")
        break;
      case 'ps':
        window.open('https://pan.baidu.com/s/1mP__lVIa_VPacKaatNOrMw?pwd=2ue9', "_blank")
        break; case 'api':
        window.open('https://pan.baidu.com/s/163fkMRoc_VKEKhrC8uTIxg?pwd=vn0z', "_blank")
        break;
      default:
        break;
    }

  }

  return { activeExmTab, changeExmTab, downLoad }
})
